<?php
return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => '',
    'timeZone' => 'America/New_York',
    'defaultController' => 'index',
    'preload' => array(
        'log'
    ),
    'aliases' => array(
        'dao' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'models' . DIRECTORY_SEPARATOR . 'dao',
        'widgetsPlus' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'widgets'
    ),
    'import' => array(
        'application.models.*',
        'application.components.*',
        'application.extensions.*',
        
        'application.components.login.LoginPlus',
        'application.components.login.auth.*',
        
        'application.components.register.RegisterPlus',
        'application.components.register.form.*',
        
        'application.models.form.*',
        'application.models.dao.*',
        'application.components.hashModel.*',
        // address
        'application.services.*',
        'application.services.payment.api.*',
        'application.services.payment.class.*',
        'application.services.payment.data.*',
        'application.services.payment.process.*',
        'application.services.payment.api.Braintree'
    )
    // address
    ,
    
    'modules' => array()

    ,
    
    // application components
    'components' => array(
        'user' => array(
            // enable cookie-based authentication
            'allowAutoLogin' => true,
            'loginUrl' => '/login',
            'class' => 'application.components.login.class.LoginWebUser'
        )
        // 'defaultController' => 'home',
        ,
        
        // uncomment the following to enable URLs in path-format
        
        'urlManager' => array(
            'urlFormat' => 'path',
            'showScriptName' => false,
            'rules' => array(
                '<controller:\w+>/<id:\d+>' => '<controller>/index',
                '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
                '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
                'auction-<action_title:\w+>-<auction_id:\d+>' => 'index/detail',
                'c-<category_title:\w+>-<category_id:\w+>' => 'index/category'
            )
        ),
        'db' => array(
            'connectionString' => 'mysql:host=localhost;dbname=egunner_pa', // live
            'emulatePrepare' => true,
            'enableProfiling' => true,
            'enableParamLogging' => true,
            'username' => 'root', // live
            'password' => '', // live
            'charset' => 'utf8'
        ),
        'dbRedis' => array(
            'class' => 'application.components.redis.RedisDb',
            'host' => '127.0.0.1'
        ),
        'lock' => array(
            'class' => 'application.components.Lock',
        ),
        'errorHandler' => array(
            'errorAction' => 'error/error'
        ),
        'log' => array(
            'class' => 'CLogRouter'
        ),
        'resource' => array(
            'class' => 'application.components.Resource'
        ),
        'tools' => array(
            'class' => 'application.components.Tools'
        )
    ),
    'params' => array(
        'auctionLimitExpiredTime'=>2592000,
        'paymentAPI'=>array(
            'authorizeNet'=>array(
                'account'=>array(
                    'api_login_id'  => '9qB55G6Lf7',
                    'transaction_key' => '22EzzjV5n7n8V37M',
                    'sandBox'  => true,
                    'test_request'  => "TRUE",
                ),
            ),
        ),
    )
);